package com.lqm.service.home;

import com.lqm.entity.home.HomeUser;
import com.lqm.entity.home.Project;
import org.apache.catalina.LifecycleState;

import java.util.List;

public interface ProjectService {
    public Project getProjectById(Integer id);

    /**
     * 获取所有项目，分页方式
     * @param page
     * @param limit
     * @return
     */
    public List<Project> getAllProjectLimit(int page,int limit,Project project);

    Integer getAllProjectLimitCount(Project project);

    public List<Project> getAllProjectLimitAdmin(int page,int limit,Project project);

    Integer getAllProjectLimitCountAdmin(Project project);


    /**
     * 设置项目的状态
     * @param project
     * @param status
     * @return
     */
    public Integer setProjectStatus(Project project,int status);

    /**
     * 获取所有成功项目，分页方式
     * @param page
     * @param limit
     * @return
     */
    public List<Project> getAllSuccessProjectLimit(int page,int limit);

    public Project saveProject(Project project);

    /**
     * 获取用户所有的项目
     * @param page
     * @param limit
     * @param homeUser
     * @return
     */
    public List<Project> getUserProjectByPage(int page, int limit, HomeUser homeUser);

    /**
     * 获取用户发布的项目数量
     * @param homeUser
     * @return
     */
    Integer getUserProjectCount(HomeUser homeUser);


    boolean toPass(Project project);

    boolean notToPass(Project project);

    /**
     * 删除项目
     * @param project 项目
     * @return
     */
     boolean delProjectByHomeUserAndProject(Project project);
}
